# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=dcontainers
pkgver=0.8.0_alpha19
_alphanum=${pkgver/${pkgver%alpha*}/}
_pkgver=${pkgver/_$_alphanum/}
_verstring=$_pkgver-${_alphanum/ha/ha.}
pkgrel=0
pkgdesc="Containers backed by std.experimental.allocator"
url="https://github.com/dlang-community/containers"
arch="x86 x86_64 aarch64" # ldc
license="BSL-1.0"
makedepends="meson ldc ldc-runtime stdx-allocator-dev"
subpackages="$pkgname-dev"
source="https://github.com/dlang-community/containers/archive/v$_verstring/containers-$_verstring.tar.gz"
builddir="$srcdir/containers-$_verstring"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="ef415e2bf7829e05c458cee0e41b6fc5768805a8dee332fb6a01a72e1e723f240f183cd1fd5ed74848cc4ea860b0746dca1c5dee13d37f819f0025da99098c4a  containers-0.8.0-alpha.19.tar.gz"
